package reflect;
@AutoRunClass
public class Person {
    private String name ;
    private int age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name) {
        this.name = name;
    }


    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void sayHello(){
        System.out.println(name+"hello!");
    }
    @AutoRunMethod(name="小花",value = 10)
    public void sayHi(){
        System.out.println(name+"Hi!");
    }
    public void doSome(){
        System.out.println(name+"正在做某事");
    }
    @AutoRunMethod(name="小明")
    public void sleep(){
        System.out.println(name+"正在睡觉");
    }
    public void watchTV(){
        System.out.println(name+"正在看电视");
    }
    @AutoRunMethod(name="小黑")
    public void study(){
        System.out.println(name+"正在学习");
    }
    public void playGame(){
        System.out.println(name+"正在玩游戏");
    }
    @AutoRunMethod(name="小红")
    public void sing(){
        System.out.println(name+"正在唱歌");
    }

    public void say(String info){
        System.out.println(name+":"+info);
    }

    public void say(String info,int count){
        for (int i=0;i<count;i++){
            System.out.println(name+":"+info);
        }
    }
    private void heHe(){
        System.out.println("我是person的私有方法heHe()!");
    }

}
